﻿using System;
using System.Collections.Generic;
using System.Text;
using SampleImageGenerator.Rendering;

namespace SampleImageGenerator.Factories
{
	internal class RendererFactory
	{
		private Int32 salt = 0xf00d;

		public IRenderer GetRenderer(Int32 seed)
		{
			Random random = new Random(seed ^ salt);

			IRenderer[] renderers = new IRenderer[] {
				new HeightRenderer(),
				//new FlatRenderer()
			};

			Int32 index = random.Next(0, renderers.Length);
			IRenderer renderer = renderers[index];

			return renderer;
		}
	}
}
